﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MainAdmin.Master" CodeBehind="AdminUpdateUser.aspx.vb" Inherits="QLThuVien.AdminUpdateUser" %>

<%@ Register Assembly="DevExpress.XtraCharts.v15.1.Web, Version=15.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.XtraCharts.Web" TagPrefix="dxchartsui" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" >

    function showImgAfterUpload(s, e) {

        img_docgia.SetImageUrl("img/user/" + e.callbackData);

    }
    function checkAlert(s, e) {
        if (s.cp_showAlertMessage) {
            alert(s.cp_showAlertMessage);
            delete s.cp_showAlertMessage; 
        }
    }
    
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="row">
        <div class="col-md-12">
            <h1 class="page-header">
                Cập Nhập Độc Giả
            </h1>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <dx:ASPxCardView ID="cardview_docgia" runat="server" KeyFieldName="taikhoan" 
                Width="100%" AutoGenerateColumns="False" EnableTheming="True" EnableCallBacks="True" 
                 OnCellEditorInitialize="cardview_docgia_CellEditorInitialize" >
                <Columns>
                    <dx:CardViewImageColumn FieldName="hinh" Name="Hình Ảnh" >
                    <PropertiesImage EmptyImage-Url="img/noImgDocGia.png"  ImageHeight="200px" ImageWidth="100%"   ImageAlign="Top"   >
<EmptyImage Url="img/noImgDocGia.png"></EmptyImage>
                        </PropertiesImage> 
                        
                    <EditItemTemplate>
                        <dx:ASPxImage ID="img_docgia" ClientInstanceName="img_docgia"  runat="server" ShowLoadingImage="true" Width="100%" Height="200px" EmptyImage-Url="~/img/noImgDocGia.png" >
                        
                                    </dx:ASPxImage>
                        <dx:ASPxUploadControl ID="upload_hinh" runat="server" UploadMode="Auto"    ClientInstanceName="upload_hinh"  ShowUploadButton="true" ShowProgressPanel="true"
                                Width="100%" BrowseButton-Text="Chọn Hình..." NullText="Chấp Nhận .JPG, .GIF hoặc .PNG" onfileuploadcomplete="upload_hinh_FileUploadComplete" >
                                <UploadButton Image-IconID="navigation_up_16x16office2013" ></UploadButton>
                                <ValidationSettings AllowedFileExtensions=".jpg, .jpeg, .gif ,.png"  ShowErrors="true"/>
                            <ClientSideEvents FileUploadComplete="showImgAfterUpload" />
                            </dx:ASPxUploadControl>  
                    </EditItemTemplate> 
                    </dx:CardViewImageColumn>  
                    <dx:CardViewColumn FieldName="taikhoan" Caption="Tài Khoản" ReadOnly="True"   ></dx:CardViewColumn>
                    
                    <dx:CardViewColumn FieldName="ngaydk" Caption="Ngày Đăng Ký"  ReadOnly="True">
                    
                    </dx:CardViewColumn>  
                    <dx:CardViewColumn FieldName="ten" Caption="Họ và Tên" ></dx:CardViewColumn>
                    <dx:CardViewCheckColumn FieldName="gioitinh" Caption="Giới Tính" >
                    
                    <PropertiesCheckEdit DisplayTextChecked="Nam" DisplayTextUnchecked="Nữ" UseDisplayImages="false" EncodeHtml="false"  >
                               
                    </PropertiesCheckEdit>               
                    </dx:CardViewCheckColumn>
                    <dx:CardViewColumn FieldName="sdt" Caption="Số Điện Thoại" ></dx:CardViewColumn>
                    <dx:CardViewColumn FieldName="diachi" Caption="Địa Chỉ" ></dx:CardViewColumn>
                    <dx:CardViewColumn FieldName="ghichu" Caption="Ghi Chú"  >
                    </dx:CardViewColumn>
                </Columns>
                
        <CardLayoutProperties>
            <Items>
             <dx:CardViewCommandLayoutItem ShowEditButton="true" ShowDeleteButton="true"/>
             
            <dx:CardViewColumnLayoutItem  ColumnName="hinh" ShowCaption="False"   >
            </dx:CardViewColumnLayoutItem>
            <dx:CardViewLayoutGroup ShowCaption="False"  VerticalAlign="Bottom" GroupBoxDecoration="None" SettingsItemCaptions-Location="Left"      >
            <SettingsItems VerticalAlign="Middle" Width="100%"  HorizontalAlign="Center" />  
            <Items>   
                <dx:CardViewColumnLayoutItem ColumnName="taikhoan" Caption="Tài Khoản" CssClass="alert-danger"   />
                
                 <dx:CardViewColumnLayoutItem ColumnName="ngaydk" Caption="Ngày Đăng Ký"   >
               
                </dx:CardViewColumnLayoutItem>
                <dx:CardViewColumnLayoutItem ColumnName="ten" Caption="Họ và Tên"  />
                <dx:CardViewColumnLayoutItem ColumnName="gioitinh" Caption="Giới Tính" HelpTextSettings-Position="Bottom"  HelpTextStyle-ForeColor="DarkBlue"  >

                </dx:CardViewColumnLayoutItem>
               
                  
                <dx:CardViewColumnLayoutItem ColumnName="sdt" Caption="Số Điện Thoại"/>
                <dx:CardViewColumnLayoutItem ColumnName="diachi" Caption="Địa Chỉ"/>
                <dx:CardViewColumnLayoutItem ColumnName="ghichu" Caption="Ghi Chú"/>
                <dx:EditModeCommandLayoutItem HorizontalAlign="Right" >
                </dx:EditModeCommandLayoutItem>    
            </Items> 
            </dx:CardViewLayoutGroup>  
                
            </Items>
        </CardLayoutProperties>
        
        <SettingsCommandButton>
           
            <EditButton Image-IconID="actions_edit_16x16devav" ButtonType="Image" >

<Image IconID="actions_edit_16x16devav"></Image>
            </EditButton>
            <DeleteButton Image-IconID="actions_cancel_16x16office2013" ButtonType="Image">
<Image IconID="actions_cancel_16x16office2013"></Image>
            </DeleteButton>
            <UpdateButton Image-IconID="actions_refresh_16x16office2013" ButtonType="Image"   >
<Image IconID="actions_refresh_16x16office2013"></Image>
            </UpdateButton>
            <CancelButton Image-IconID ="actions_close_16x16devav" ButtonType="Image" >
<Image IconID="actions_close_16x16devav"></Image>
            </CancelButton>
        </SettingsCommandButton>

        <SettingsEditing Mode="PopupEditForm"  />  
        <SettingsBehavior ConfirmDelete="true"/>
        <SettingsSearchPanel Visible="true" />
        <SettingsPager  PageSizeItemSettings-Visible="true" PageSizeItemSettings-Position="Right" Position="TopAndBottom" >
        
<PageSizeItemSettings Visible="True"></PageSizeItemSettings>
        
        </SettingsPager>
        <SettingsPopup EditForm-Modal="true" EditForm-Width="350px" EditForm-AllowResize="true">
        <EditForm ShowHeader="false" HorizontalAlign="WindowCenter" VerticalAlign="WindowCenter"  /> 
        </SettingsPopup> 
        <SettingsText ConfirmDelete="Bạn có muốn xóa không?"  />
        <ClientSideEvents EndCallback="checkAlert"  />
            </dx:ASPxCardView>
        </div>
    </div>
</asp:Content>
